package com.swt.gap.service;

import com.swt.gap.common.exception.NoMatchedTemplateException;
import com.swt.gap.common.graph.TransferGraphDataVO;
import com.swt.gap.model.vo.FormDataVO;
import com.swt.gap.model.graphmodel.FormFileModelVO;
import com.swt.gap.model.graphmodel.TextFileModelVO;
import com.swt.gap.common.graph.GraphNeo4jVO;
import com.swt.gap.model.vo.ImportGraphDataVO;
import com.swt.gap.model.vo.ParseEntityParamsVO;
import com.swt.gap.model.vo.ParseEntityVO;
import com.swt.gap.model.vo.graph.PreviewGraphDataVO;
import com.swt.gap.model.vo.graph.DocImportVO;
import com.swt.gap.model.vo.graph.TaskOverviewVO;

import java.io.IOException;
import java.time.format.DateTimeParseException;
import java.util.List;

/**
 * @author sx
 */
public interface GraphDataService {

    FormDataVO getFormFileData(String savedFileName);

    String getTextFileData(String savedFileName) throws Exception;

    ParseEntityVO parseEntity(ParseEntityParamsVO fileInfo);

    TransferGraphDataVO generateGraphDataByFile(FormFileModelVO template) throws DateTimeParseException, NoMatchedTemplateException;

    Boolean importGraphData(ImportGraphDataVO graphData);

    TransferGraphDataVO generateGraphDataByText(TextFileModelVO textFileModelVO) throws DateTimeParseException, NoMatchedTemplateException;

    TaskOverviewVO getTaskOverview(Integer taskId);

    List<GraphNeo4jVO.Node> getNodeByLabelAndTaskId(Integer taskId, Integer pageNum, Integer pageSize, String label);

    List<String> getModelContentByTaskId(Integer taskId);

    Boolean importDocGraph(DocImportVO record);

    Integer importKB(Integer taskId, String fileName) throws IOException;

    Boolean test(String fileName, Integer taskId, Integer fileId);

    Boolean autoImportFileGraph(List<Integer> fileIds, Integer taskId);


    Boolean isWaiting(PreviewGraphDataVO record);

}
